package com.crm.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the OFFER_DETAIL database table.
 * 
 */
@Entity
@Table(name="OFFER_DETAIL")
@NamedQuery(name="OfferDetail.findAll", query="SELECT o FROM OfferDetail o")
public class OfferDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue = 1, allocationSize = 1,name="OFFER_DETAIL_DEID_GENERATOR", sequenceName="SEQ2")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="OFFER_DETAIL_DEID_GENERATOR")
	@Column(name="DE_ID")
	private Long deId;

	private BigDecimal counts;

	@Column(name="OFFER_DETAIL_IS_DEL")
	private String offerDetailIsDel;

	@Column(name="P_ID")
	private BigDecimal pId;

	private BigDecimal price;

	@Temporal(TemporalType.DATE)
	@JSONField(format="yyyy-MM-dd")
	@Column(name="SET_TIME")
	private Date setTime;

	@Column(name="TOTAL_MONEY")
	private BigDecimal totalMoney;

	//bi-directional many-to-one association to Offer
	@ManyToOne
	@JoinColumn(name="OFFER_ID")
	private Offer offer;

	public OfferDetail() {
	}

	public Long getDeId() {
		return this.deId;
	}

	public void setDeId(Long deId) {
		this.deId = deId;
	}

	public BigDecimal getCounts() {
		return this.counts;
	}

	public void setCounts(BigDecimal counts) {
		this.counts = counts;
	}

	public String getOfferDetailIsDel() {
		return this.offerDetailIsDel;
	}

	public void setOfferDetailIsDel(String offerDetailIsDel) {
		this.offerDetailIsDel = offerDetailIsDel;
	}

	public BigDecimal getPId() {
		return this.pId;
	}

	public void setPId(BigDecimal pId) {
		this.pId = pId;
	}

	public BigDecimal getPrice() {
		return this.price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Date getSetTime() {
		return this.setTime;
	}

	public void setSetTime(Date setTime) {
		this.setTime = setTime;
	}

	public BigDecimal getTotalMoney() {
		return this.totalMoney;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}

	public Offer getOffer() {
		return this.offer;
	}

	public void setOffer(Offer offer) {
		this.offer = offer;
	}

}